From: ihy123 Date: Sun, 17 Aug 2025 16:22:50 +0000 (+0300) Subject: ip/ffmpeg: don't process empty frames X-Git-Tag: archive/raspbian/2.12.0-2+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=22f8428c20eb42f9bed7250b6924faafbb6aa408;p=cmus.git ip/ffmpeg: don't process empty frames Gbp-Pq: Name 0012-ip-ffmpeg-don-t-process-empty-frames.patch --- diff --git a/ip/ffmpeg.c b/ip/ffmpeg.c index af6ecfb..dd9061a 100644 --- a/ip/ffmpeg.c +++ b/ip/ffmpeg.c @@ -356,7 +356,7 @@ static int ffmpeg_get_frame(struct ffmpeg_private *priv) priv->curr_duration += priv->pkt->duration; res = avcodec_send_packet(priv->codec_ctx, priv->pkt); - if (res == AVERROR(EAGAIN)) + if (res == 0 || res == AVERROR(EAGAIN)) return 0; } if (res < 0)